<%--
  Created by IntelliJ IDEA.
  User: lyh
  Date: 2025/3/9
  Time: 21:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
request.setCharacterEncoding("utf-8");//设置以utf-8进行解码，解决汉字乱码问题
String logname=request.getParameter("aa");//获取参数
String logpwd=request.getParameter("bb");

if (logname.equals("张三")&&logpwd.equals("123")){
    response.sendRedirect("index.jsp");//登陆成功
}else {
    response.sendRedirect("log.jsp");//登陆失败跳转到新页面
}
%>
请求的用户名：<%=logname%><br/>
密码为：<%=logpwd%><br/>
</body>
</html>
